apiVersion: v1
kind: ConfigMap
metadata:
  {{- include "helm_lib_module_labels" (list . (dict "app.kubernetes.io/name" "argocd-cm" "app.kubernetes.io/part-of" "argocd" "app" "argocd-server")) | nindent 2 }}
  name: argocd-cm
  namespace: d8-{{ .Chart.Name }}
data:
  url: {{ include "helm_lib_module_uri_scheme" . }}://{{ include "helm_lib_module_public_domain" (list . "argocd") }}
  admin.enabled: {{ .Values.delivery.argocd.admin.enabled | quote }}
  {{- if (include "helm_lib_module_https_ingress_tls_enabled" .) }}
  oidc.config: |
    name: Dex
    issuer: https://{{ include "helm_lib_module_public_domain" (list . "dex") }}/
    clientID: dex-client-argocd@d8-{{ .Chart.Name }}
    clientSecret: $dex-client-argocd:clientSecret
  oidc.tls.insecure.skip.verify: "true"
  {{- end }}
